from classes.TestStep import TestStep
from classes.TestCase import TestCase
from classes.SCMAutoTestManager import SCMAutoTestManager
import requests
import json
import time
import os
  
  
# 3. main函数调用SCMAutoTestManager的testXXXX方法
def run_test():
    api_url = "http://127.0.0.1:5000/api/test/execute"
    manager = SCMAutoTestManager(api_url=api_url)
    # 构造输入数据
    input_data = {
        "username": "admin",
        "password": "123456"
    }

    input_cust_data = {            
        "customer_code": "KH001",
        "customer_short_name": "测试客户简称",
        "customer_full_name": "测试客户全称",
        "owner": "张三",
        "phone": "13800000000",
        "address": "北京市海淀区XX路",
        "email": "test@example.com",
        "country": "中国",
        "business_owner": "李四",
        "credit_code": "1234567890ABCDEF",
        "bank": "中国银行",
        "bank_account": "6222021234567890",
        "customer_remark": "这是一个测试备注"
    }
    
    test_id = "my_test_id_001"
    result = manager.test_add_customer_basic_info(input_data=input_cust_data,test_id=test_id)
 
if __name__ == "__main__":
    run_test()